﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Jiuyong
{
	namespace Views
	{
		/// <summary>
		/// RehabFilePage.xaml 的交互逻辑
		/// </summary>
		public partial class RehabFilePage : Page
		{
			public RehabFilePage()
			{
				InitializeComponent();
				Loaded += RehabFilePage_Loaded;
			}

			void RehabFilePage_Loaded(object sender, RoutedEventArgs e)
			{
				CommandBindings.AddRange(new CommandBindingCollection()
				{
					//new CommandBinding(ApplicationCommands.SaveAs,VM.SelectSavePath)
					//,
					new CommandBinding(ApplicationCommands.Open, VM.SelectOpenPath)
					,
					new CommandBinding(ApplicationCommands.New,VM.SelectSavePath)
					//,
					//new CommandBinding(ApplicationCommands.Replace,ViewModel.GetOutputString)
					//,
					//new CommandBinding(MediaCommands.Play,VM.GetInputString)
					,
					new CommandBinding(ApplicationCommands.Save,VM.SaveSetting)
					//,
					//new CommandBinding(ApplicationCommands.Delete,ViewModel.ClearOutput)
					//,
					//new CommandBinding(ApplicationCommands.Find,ViewModel.GetSkipPath)
					,
					new CommandBinding(MediaCommands.Select,VM.SelectConfig)
				});
			}

			public ViewModels.RehabFileViewModel VM
			{
				get
				{
					return DataContext as ViewModels.RehabFileViewModel;
				}
			}
		}
	}

	public class RehabFileConfig:FilesConfig
	{
		//public override void Save()
		//{
		//    Config<RehabFileConfig>.Save(this);
		//}
	}

	namespace ViewModels
	{
		public class RehabFileViewModel:FilesViewModel<RehabFileConfig>
		{
			//public void GetInputPath(object sender, ExecutedRoutedEventArgs e)
			//{
			//}
		}
	}
}
